package org.apache.flink.runtime.providermanager;

import static org.apache.flink.util.Preconditions.checkNotNull;

import java.io.Serializable;

import org.apache.flink.runtime.clusterframework.types.ResourceID;

/**
 * This class encapsulates the connection information of a 资源提供者, without resolving the
 * hostname. See also {@link ProviderManagerLocation}.
 */
public class UnresolvedProviderManagerLocation implements Serializable {

    private static final long serialVersionUID = 1L;

    private final ResourceID resourceID;
    private final String externalAddress;
    private final String nodeId;

    public UnresolvedProviderManagerLocation(
            final ResourceID resourceID,
            final String externalAddress,
            final String nodeId) {

        this.resourceID = checkNotNull(resourceID);
        this.externalAddress = checkNotNull(externalAddress);
        this.nodeId = checkNotNull(nodeId);
    }

    public ResourceID getResourceID() {
        return resourceID;
    }

    public String getExternalAddress() {
        return externalAddress;
    }
    
    public String getNodeId() {
        return nodeId;
    }
}
